<?php
namespace jy_yxfrom;
defined('BY_JYA') or exit('error');
/*
	核销
*/
class verify extends \plugin{
	//配送核销
	public function self_verify($verify_code,$clerk_id){
		$order_verify=$this->pdo_get('order',array('uniacid'=>$uniacid,'selfnumber'=>$verify_code));
		if(!$order_verify){
			exi('核销码不存在！','error','jy_yxfrom/index/');
		}
		if($order_verify['status']==4){
			exi('核销码已被使用或已过期！','error','jy_yxfrom/index/');
		}
		//按消费码核销
		$update=array(
			'status'=>4,
		);
		$this->pdo_update('order',$update,array('id'=>$order_verify['id']));
		return true;
	}
	
}